In general, a chaotic system is a dynamical system which has no periodicity and the final state of which depends so sensitively on the system's precise initial state that its time-dependent path is, in effect, long-term unpredictable even though it is deterministic.
One approach to chaotic communication, Short, et al., Method and Apparatus for Secure Digital Chaotic Communication, U.S. patent application Ser. No. 09/436,910 (“Short I”), describes a chaotic system controlled by a transmitter/encoder and an identical chaotic system controlled by a receiver/decoder. Communication is divided into two steps: initialization and transmission. The initialization step uses a series of controls to drive the identical chaotic systems in the transmitter/encoder and receiver/decoder into the same periodic state. This is achieved by repeatedly sending a digital initialization code to each chaotic system, driving each of them onto a known periodic orbit and stabilizing the otherwise unstable periodic orbit. The necessary initialization code contains less than 16 bits of information. The transmission step then uses a similar series of controls to steer the trajectories of the periodic orbits to regions of space that are labeled 0 and 1, corresponding to the plain text of a digital message.
Short, et al., Method and Apparatus for Compressed Chaotic Music Synthesis, U.S. Pat. No. 6,137,045 (“Short II”), describes the use of such an initialization step to produce and stabilize known periodic orbits on chaotic systems, which orbits are then converted into sounds that approximate traditional music notes. By sending a digital initialization code to a chaotic system, a periodic waveform can be produced that has a rich harmonic structure and sounds musical. The one-dimensional, periodic waveform needed for music applications is achieved by taking the x-, y-, or z-component (or a combination of them) of the periodic orbit over time as the chaotic system evolves. The periodic waveform represents an analog version of a sound, and by sampling the amplitude of the waveform over time, e.g., using audio standard PCM 16, one can produce a digital version of the sound. The harmonic structures of the periodic waveforms are sufficiently varied that they sound like a variety of musical instruments.
Short, Method and Apparatus for the Compression And Decompression of Audio Files, U.S. patent application Ser. No. 09/597,101 (“Short III”) describes the creation of a library of basic waveforms associated with a chaotic system by applying selected digital initialization codes to the chaotic system. Each initialization code is in one-to-one correspondence with a specific basic waveform, allowing the use of the corresponding initialization code to represent the basic waveform. The basic waveforms are then used to approximate a section of audio file.
The basic waveforms that are most closely related to the section of audio file are selected, and a weighted sum of the selected basic waveforms is used to approximate the section of audio file. Once a weighted sum is produced that approximates the section of audio file to a specified degree of accuracy, the basic waveforms can be discarded and only the weighting factors; the corresponding initialization codes; and certain frequency information are stored in a compressed audio file. The compressed audio file may also contain other implementation-dependent information, e.g. header information defining sampling rates, format, etc. When the compressed audio file is decompressed for playback, the initialization codes are stripped out and used to regenerate the basic waveforms, which are recombined according to the weighting factors in the compressed audio file to reproduce an approximation of the original section of audio file.
The present invention is a system for compression and decompression of image files. An image file may exist in any one of a number of commercially available formats, e.g. grayscale format, “yuv” format, “rgb” format, or any of a number of other formats in general use. In the grayscale format, the gray level is the sole variable, and each image in the image file represents a 2-dimensional matrix in which each position carries information about the gray level, which is just the degree of darkness on a scale of a fixed number of possible shades of gray, scaling from white to black. In the “rgb” format, every position in the 2-dimensional matrix carries information about the red level, green level and blue level, which is just the degree of intensity on the color scale. In the “yuv” format, one of the dimensions is a gray scale level, and the remaining two dimensions represent color levels.
The primary feature that separates an image file from time series data produced in an audio file is that the data in an image file comes in disconnected “slices,” where the term slice denotes a single vertical or horizontal scan line on an analog screen or a single vertical or horizontal line of pixels in a digital image. For example, if the digital image is 1280×1024 pixels, there are 1280 rows, or slices, of 1024 pixels. Thus, the maximum slice length is externally imposed in an image application, and compression can be done on a slice of maximum length or on any portion thereof.
The first step in image file compression is to decompose an image first into slices of maximum length or any portion therof desired. The process is simplest to picture in the grayscale format, where the two-dimensional pixel matrix just has a single entry (the grayscale level) at each position in the matrix. In the “rgb” format, for example, it is best to picture the data in 3 separate two-dimensional pixel matrices. Each two-dimensional matrix would contain just the color level for a single color Forming a slice from one of the matrices is simply a matter of extracting a single row or column at a time. The data on each slice is either the gray level at each position on the slice if it is in grayscale format; the red level, green level or blue level at each position on the slice if it is in “rgb” format; or the gray level, first color level, or second color level in the “yuv” format.
The slice data differs from the time series data in an audio file in one important respect. Audio file data tends to be almost periodic on short time scales and oscillates around a zero. The slice data, which is a color level, often shows a definite trend, either increasing or decreasing over an extended span of pixels. It does not necessarily appear oscillatory and does not necessarily have the short-term periodic structure of chaotic waveforms. The solution to this problem can be achieved by taking the slice data and removing the trend line from the data to produce a detrended image slice. In the cases where there is a discontinuity in the trend of the data across the slice, one can break the slice up into a small number of shorter slices and remove the trend from the shorter slices. In one embodiment, the trend line may be replaced by a spline curve fit to the data or any other simple functional approximation of the large scale trends in the data. In another embodiment, the data on the slice is considered to be a one-dimensional collection of ordered data points, and a best-fit least squares regression line is calculated to fit the data. This best-fit line is the trend line, and once it is subtracted from the data, the residual difference, or detrended image slice, formed by subtracting the trend line from the image slice is oscillatory in nature. Trend line information describing the trend line is stored. The detrended image slice is now suitable for compression onto chaotic waveforms, following a procedure described below similar to that described in Short III.
In summary, a library of basic waveforms associated with a chaotic system is produced, by applying selected digital initialization codes to the chaotic system. The basic waveforms that can be produced with 16-bit initialization codes range from simple cases that resemble the sum of a few sine waves with an associated frequency spectrum containing only two or three harmonics, to extremely complex waveforms in which the number of significant harmonics is greater than 100. Importantly, the initialization codes are 16 bits regardless of whether the basic waveforms are simple or complex. By contrast, in a linear approach, one would expect the number of bits necessary to produce a waveform to be proportional to the number of harmonics in the waveform. The number of harmonics present in the waveforms is directly tied to the complexity of the structure, and it is generally true that if there are many harmonics in a waveform, there is more fine structure present in the waveform. This makes it possible to match the rapid variation often present in the detrended image slices and, further, since the spectral content of any sharp edges in a detrended image slice requires a high number of harmonics to reproduce the sharp edge, the fact that the chaotic waveforms have high harmonic content means that they are naturally suited to image reproduction. Equally importantly, each initialization code is in one-to-one correspondence with a specific basic waveform, allowing the use of the corresponding initialization code to represent the basic waveform. Then basic waveforms selected from the library are used to approximate a detrended image slice.
The basic waveforms that are most closely related to the detrended image slice are selected, and all the selected basic waveforms and the detrended image slice are transformed to a proper frequency range. Then, a weighted sum of the selected basic waveforms is used to approximate the detrended image slice. Once a weighted sum is produced that approximates the detrended image slice to a specified degree of accuracy, the basic waveforms can be discarded. Only the corresponding initialization codes; the weighting factors, the trend line information, and certain phase and frequency information described below are stored in a compressed image file. Once the detrended image slices from all the slices of an image file have been compressed, the processing can advance to the next image in the image file. The compressed image file may also contain other implementation-dependent information, e.g. header information defining aspect ratios, trend line specifications (e.g. slope and intercept) format, etc. When the compressed image file is decompressed for playback, the initialization codes are stripped out and used to regenerate the basic waveforms, which are transformed to the proper frequency range and recombined according to the weighting factors in the compressed image file to reproduce the detrended image slice. The trend line information is then read from the compressed image file and the trend across the original slice is then regenerated and added back to the detrended image slice. This reproduces an approximation of the original image slice.
The compressed image file can be transmitted, or stored for later transmission, to an identical chaotic system for decompression at a remote location. In practice, the remote location does not need the compression part of the system and would only use the decompression part of the system if playback of the image file is all that is desired.
A further degree of compression is often possible and desirable. After finding a suitable weighted sum of basic waveforms, the weighted sum can be examined and any waveforms that contribute less to the overall approximation than a specified threshold can be eliminated. When such waveforms are identified, the corresponding initialization codes can be removed from the compressed image file. Also, because the compression may be done on sequences of image, it is possible to look at the basic waveforms and the corresponding initialization codes to determine if there is a predictable pattern to the changes from image to image in the sequence . If such patterns are detected, further compression of the compressed image file can be achieved by storing only the requisite initialization code and information about the pattern of changes for subsequent images.
It is an object of the present invention to create compressed image files for distribution over the Internet. Compression ratios at better than 50-to-1 may be possible, which will allow for the transmission of image files over the Internet with greatly improved download speed. Compression of grayscale images is the most problematic application for image compression because the human eye is extremely sensitive to variations in light/dark levels. Consequently, in standard compression of grayscale image files, the data is either uncompressed, compressed at a ratio of 2:1 or compressed at a higher level with the realization that the image will be greatly degraded. Using the chaotic compression technique, it has been possible to compress 8-bit grayscale images by approximately 10:1, which would translate to approximately 20:1 for 16-bit grayscale images.
It is yet another object of the present invention to create compressed image files that are encrypted. For example, image files compressed with the present invention are naturally encrypted in accordance with Short I. In order to be able to decompress properly a compressed image file, it is necessary to have the proper chaotic decompressor. These decompressors can be distributed freely or to a group of registered users, thus allowing for some control over the distribution and reproduction of the compressed image files. Even greater control of the uses of the compressed image files can be achieved by incorporating a secondary layer of a secure chaotic distribution channel, using the technology described in Short I, to encode the digital bits of the compressed image files before transmitting them to a user. Since registered users can be given unique chaotic decoders, it will be possible to place a “security wrapper” around the compressed image files, so that only a registered user will be able to access it. It will also be possible to structure the security wrapper so that a movie file can be played a given number of times after paying a fee.